<template>
	<view class="module-box" @click="onItemClick(item.id)" :style="{backgroundColor: item.theme_color}">
		<image class="module-img" :src="item.white_logo" mode="widthFix"></image>
		<view class="module-text">
			<text class="title-en">{{item.name_ne}}</text>
			<text class="title-cn">{{item.name}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			width: Number,
			height: Number,
			item: Object
		},
		methods: {
			onItemClick(id) {
				this.$emit('brandItemClick',{id})
			}
		}
	}
</script>

<style>
	.module-box {
		height: 200rpx;
		margin: 10rpx;
		border-radius: 30rpx;
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.module-img {
		width: 300rpx;
		height: 300rpx;
	}

	.module-text {
		position: absolute;
		top: 0;
		left: 0;
		color: #fff;
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		line-height: 60rpx;
	}
</style>